package Demo5;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 洪汤泽大帅哥
 * Date: 2024-12-22
 * Time: 20:23
 */
import java.util.*;

class StringList{
    public LinkedList<String> constructList(String[] strs){
        LinkedList<String> strings = new LinkedList<String>();
        for (int i = 0; i < strs.length; i++) {
            strings.add(strs[i]);
        }
        return strings;
    }
    public String search(LinkedList<String> list) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        String s = "";

        for (int i = 0; i < list.size(); i++) {
            if (list.get(i).length()==n){
                s+= list.get(i)+" ";
            }
        }
        if (s.length()==0){
            return "not exist";
        }else {
            return s;
        }

    }
}

public class Main {
    public static void main(String[] args) {
        String[] strs = {"12345","67891","12347809931","98765432102","67891","12347809933","12347809931"};
        StringList sl=new StringList();
        LinkedList<String> qqList=sl.constructList(strs);
        System.out.println(sl.search(qqList));
    }
}
/* 请在这里填写答案：StringList类 */